//
//  CityListModel.swift
//  swiftDemo
//
//  Created by Gerry on 2021/10/30.
//

import UIKit

class CityListModel: NSObject,NSCoding,  YYModel {
    func encode(with coder: NSCoder) {
        self.yy_modelEncode(with: coder)
    }
    
    required convenience init?(coder: NSCoder) {
        self.init()
        self.yy_modelInit(with: coder)
    }

    @objc var ids : Int = 0
    @objc var code : String?
    @objc var name : String?
    @objc var baiduCode : String?
    @objc var gaodeCode : String?
    @objc var tengxunCode : String?
    @objc var parentId : Int = 0
    @objc var level : Int = 0
    @objc var areas : [CityListModel]?
        
    
    static func modelCustomPropertyMapper() -> [String : Any]? {
        return ["ids":"id"]
    }
    
    static func modelContainerPropertyGenericClass() -> [String : Any]? {
        return ["areas":CityListModel.classForCoder()]
    }
}
